package org.thss.petri.gef.editparts.policies;

import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.ComponentEditPolicy;
import org.eclipse.gef.requests.GroupRequest;
import org.thss.petri.gef.commands.DeleteTokenCommand;
import org.thss.petri.model.Token;

public class TokenComponentEditPolicy extends ComponentEditPolicy {

	@Override
	protected Command createDeleteCommand(GroupRequest deleteRequest) {
		DeleteTokenCommand command = new DeleteTokenCommand();
		command.setToken((Token) getHost().getModel());
		return command;
	}

}
